package com.xyd.common.exception;

import com.xyd.common.result.ResultStatusEnum;
import lombok.Data;

@Data
public class YiYunGlobalException extends RuntimeException{
    private Integer status;
    private String message;


    public YiYunGlobalException(Integer status, String message) {
        super(message);
        this.status=status;
        this.message=message;
    }

    /**
     * 接收枚举类型对象
     * @param resultStatusEnum
     */
    public YiYunGlobalException(ResultStatusEnum resultStatusEnum) {
        super(resultStatusEnum.getMessage());
        this.status = resultStatusEnum.getStatus();
        this.message = resultStatusEnum.getMessage();
    }




}
